net/mwan3: fix indentation
authorFlorian Eckert <[email protected]>
Fri, 11 May 2018 06:30:54 +0000 (08:30 +0200)
committerFlorian Eckert <[email protected]>
Fri, 11 May 2018 06:43:34 +0000 (08:43 +0200)
Fix indentation.

Signed-off-by: Florian Eckert <[email protected]>
net/mwan3/files/usr/sbin/mwan3track

index c705479047d2ce26eb06b57dea46a183d89923c1..f445b146e0e88328e77ab4387cb2d40bee35b77c 100755 (executable)
@@ -118,18 +118,18 @@ main() {
                        if [ $host_up_count -lt $reliability ]; then
                                case "$track_method" in
                                        ping)
-                                                       if [ $check_quality -eq 0 ]; then
-                                                               ping -I $DEVICE -c $count -W $timeout -s $size -q $track_ip &> /dev/null
-                                                               result=$?
+                                               if [ $check_quality -eq 0 ]; then
+                                                       ping -I $DEVICE -c $count -W $timeout -s $size -q $track_ip &> /dev/null
+                                                       result=$?
+                                               else
+                                                       ping_result="$(ping -I $DEVICE -c $count -W $timeout -s $size -q $track_ip | tail -2)"
+                                                       loss="$(echo "$ping_result" | grep "packet loss" |  cut -d "," -f3 | awk '{print $1}' | sed -e 's/%//')"
+                                                       if [ "$loss" -eq 100 ]; then
+                                                               latency=999999
                                                        else
-                                                               ping_result="$(ping -I $DEVICE -c $count -W $timeout -s $size -q $track_ip | tail -2)"
-                                                               loss="$(echo "$ping_result" | grep "packet loss" |  cut -d "," -f3 | awk '{print $1}' | sed -e 's/%//')"
-                                                               if [ "$loss" -eq 100 ]; then
-                                                                       latency=999999
-                                                               else
-                                                                       latency="$(echo "$ping_result" | grep -E 'rtt|round-trip' | cut -d "=" -f2 | cut -d "/" -f2 | cut -d "." -f1)"
-                                                               fi      
+                                                               latency="$(echo "$ping_result" | grep -E 'rtt|round-trip' | cut -d "=" -f2 | cut -d "/" -f2 | cut -d "." -f1)"
                                                        fi
+                                               fi
                                        ;;
                                        arping)
                                                arping -I $DEVICE -c $count -w $timeout -q $track_ip &> /dev/null